package com.sen.accest.controller;


import com.sen.accest.service.TestService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.*;

/**
 * @作者: 韩宗森
 * @创建时间: 2024年01月31日 16:54
 */
@RestController
@RequestMapping("/test")
@Tag(name = "测试模块")
public class TestController {

    @Resource
    private TestService testService;


    @Operation(summary = "post请求")
    @PostMapping("/post")
    public String body(){
        return "这是post!";
    }

    @Operation(summary = "普通body请求")
    @GetMapping("/get")
    public String get(){
        return "这是get!";
    }

    @Operation(summary = "根据name查询")
    @GetMapping("/{name}")
    public String getName(@PathVariable("name") String name){
        testService.getName(name);

        return "这是get!";
    }


}
